﻿using HAF.FoundationLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WareDealer.Helper
{
    public interface IDbProvider
    {
        void Begin();

        void Commit();

        void Rollback();

        WsList<T> Query<T>(string sql, params object[] args) where T : class;

        WsList<T> QueryPage<T>(string sql, params object[] args) where T : class;

        int Exec(string sql, params object[] args);

        int Exec(bool isBig, string sql, params object[] args);

        int ExecInsert(object obj, string tabName, string[] propNames);

        int ExecUpdate(object obj, bool isBig, string tabName, string[] propNames, string whereSql, params object[] args);

        int ExecUpdate(object obj, string tabName, string[] propNames, string whereSql, params object[] args);

        T QueryOneCol<T>(string sql, params object[] args);
    }
}
